<%@ include file="/include/head.jsp"%>
<%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<html>
	<head>
		<title>test Menu</title>
		<script src="<%=extjsPath%>/expand/ext.ux.menu.storemenu.js" type="text/javascript">
</script>
		<script type="text/javascript">
Ext.onReady(function(){  
       var anMenu = new Ext.menu.Menu({
        id:'anMenu',
        items:[{
         text:'item1'
        },{
         text:'item2'
        },{
         text:'item3'
        }]
       });
       var baseicMenu =new Ext.menu.Menu({
        id:'baseicMenu',
        items:[{
         text:'An item',
         menu:anMenu
         },
         new Ext.menu.Item({
          text:'another item'
         }),
         '-',
         new Ext.menu.CheckItem({
          text:'An item'
         }),
         new Ext.menu.CheckItem({
          text:'Another item'
         })
        ]             
       }); 
       
       var datatemp = [
    {
        "text": "first entry",
        "iconCls": "iconclass1",
        "handler": "function(item) {alert('entry one is called '+item.text);}" 
    },
    '-',
    'some text',
    '-',
    {
        "text": "entry 2",
        "iconCls": "iconclass2",
        "handler": "function(item) {myextapp.my_public_method(1234,'abc');}" 
    },
    {
        "text": "submenu",
        "iconCls": "iconclass3",
        "menu": "new Ext.ux.menu.StoreMenu({url:'menu_entries.php'})"
    }
];
       
       
       
       
       var menu = new Ext.Toolbar({
         id:'xxx',
         items:[{
          text:'首页',
          menu: {
        	 	xtype:'storeMenu',
			    url:'getMenuList.do', 
			    baseParams: { 
			        var_one: 'foo', 
			        var_two: 'bar' 
			    } 
			}
         },
         '-',{
          text:'日志'
         },
         '-',{
          text:'相册',
          menu:baseicMenu
         }]
       }) 
    var north = new Ext.Panel({
     title:"北方",
     region:"north",
     height:80
    });
    var south = new Ext.Panel({
     title:"南方",
     region:"south",
     height:80
    });
    var west = new Ext.Panel({
     title:"西方",
     region:"west",
     height:200,
     split:true,
     collapsible:true,
     collapMode:"mini"
    });   
    var center = new Ext.Panel({
     title:"中间",
     region:"center",
     tbar:menu
    });
    var vp = new Ext.Viewport({
     layout:'border',
     items:[north,south,west,center]
    });

});  
</script>
	</head>

	<body>
	<div id="container">
    <div id="toolbar"></div>
    <div id="window"></div>
</div>
	</body>
</html>
